home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette: Best of 1988 / BESTOF88.D64 / bb barrage.edt (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  4KB  |  136 lines

  1. 10 rem copyright 1988 compute! publications, inc. - all rights reserved
  2. 20 ifa=0thena=1:load"bb barrage",8,1
  3. 30 poke51,0:poke52,32:poke55,0:poke56,32:clr:poke53281,15:poke53280,15
  4. 40 print"[147]   copyright 1988 compute! pub., inc."
  5. 50 printtab(11)"all rights reserved":fori=1to1500:next
  6. 60 dimc%(255),c2(24),x(15),y(15)
  7. 70 fori=4to16:readc2(i):next
  8. 80 data1,1,1,1,1,1,3,4,5,6,7,8,9
  9. 90 fori=0to63:poke960+i,0:next
  10. 100 fori=0to23step3:reada:poke960+i,a:next
  11. 110 data255,129,129,129,129,129,129,255
  12. 120 fori=0to5:reada:h(i)=a:c%(a+128)=1:next:c%(32)=1
  13. 130 data32,81,64,93,77,78
  14. 140 fori=48to53:c%(i)=2:next
  15. 150 x(5)=1:x(6)=1:x(7)=1:x(9)=-1:x(10)=-1:x(11)=-1
  16. 160 y(10)=-1:y(14)=-1:y(6)=-1:y(9)=1:y(13)=1:y(5)=1
  17. 170 u$=chr$(145):d$=chr$(17):r$=chr$(29):l$=chr$(157):c$=chr$(147)+d$+d$
  18. 180 c%(145)=-14:c%(17)=-13:c%(29)=-7:c%(157)=-11
  19. 190 h$=chr$(159)+chr$(19)+d$+d$+d$+d$+d$
  20. 200 fori=1to5:reada:c%(a)=1:h$=h$+chr$(a)+d$+l$:next
  21. 210 data209,192,221,205,206
  22. 220 fori=3to10:reada$:c%(asc(a$))=i:h$=h$+a$+d$+l$:next
  23. 230 datap,s,l,c,m,o,h,e
  24. 240 c%(13)=11
  25. 250 x=0:y=4:ch=h(1):us=51957
  26. 260 j=56320:v=53248:pokev+21,1:pokev+39,7:pokev+23,0:pokev+29,0:poke2040,15
  27. 270 gosub560
  28. 280 pokev+1,y*8+50:t=x*8+24:ift>255thenpokev+16,1:goto300
  29. 290 pokev+16,0
  30. 300 pokev,255andt
  31. 310 a=0:t=peek(j):f=16andt:jy=15andt
  32. 320 iff=16then380
  33. 330 ifxthen360
  34. 340 a=c2(y):ifa=1thena$=chr$(h(y-4))
  35. 350 goto430
  36. 360 s=y*40+x+1024:t=ch:ifpeek(s)=chthent=32
  37. 370 pokes,t:ifmfthengosub580
  38. 380 dx=x(jy):dy=y(jy):ifdxordythen530
  39. 390 geta$
  40. 400 a=c%(asc(a$+"@")):ifa=0then310
  41. 410 ifa<0thendx=x(-a):dy=y(-a):goto530
  42. 420 ifa>2thenpoke53269,0
  43. 430 onagoto450,500,650,660,760,820,840,850,1150,1330,1340
  44. 440 goto310
  45. 450 s=x+y*40+1024:ch=asc(a$)-128:t=ch:ift<0thent=t+128:ch=t
  46. 460 ifx=0then310
  47. 470 ifpeek(s)=chthent=32
  48. 480 pokes,t:ifmfthengosub580
  49. 490 goto310
  50. 500 s=x+y*40+1024:ch=h(val(a$)):ifx=0then310
  51. 510 t=ch:pokes,t:ifmfthengosub580
  52. 520 goto310
  53. 530 y=y+dy:x=x+dx:ify<0ory>24theny=y-dy
  54. 540 ifx>38orx<0thenx=x-dx
  55. 550 goto280
  56. 560 poke53281,15:printc$:poke53281,0:printh$:sys49161
  57. 570 poke1584,13+mf*128:poke53269,1:return
  58. 580 x1=39-x:y1=24-y
  59. 590 s1=x1+y1*40+1024:pokes1,t
  60. 600 ift=77thent=78:goto620
  61. 610 ift=78thent=77
  62. 620 s1=x1+y*40+1024:pokes1,t
  63. 630 s1=x+y1*40+1024:pokes1,t
  64. 640 return
  65. 650 sys49155:clr:goto60
  66. 660 sys49158:printc$"save screen to disk"
  67. 670 ea=peek(253)+peek(254)*256+1:sa=us+13
  68. 680 he=int(ea/256):le=ea-he*256:hs=int(sa/256):ls=sa-hs*256
  69. 690 input"enter filename ";f$:iff$=""thenprint"aborted":goto740
  70. 700 open1,8,1,f$:poke193,ls:poke194,hs
  71. 710 poke174,le:poke175,he
  72. 720 sys62957:close1
  73. 730 print"save complete"
  74. 740 fori=1to999:next
  75. 750 gosub560:goto310
  76. 760 printc$"load screen from disk"
  77. 770 input"enter filename ";f$:iff$=""thenprint"aborted":goto810
  78. 780 open1,8,0,f$:poke185,1:poke780,0
  79. 790 sys65493:close1
  80. 800 print"load complete"
  81. 810 gosub560:goto310
  82. 820 poke53281,15:printc$h$:poke53281,0:x=0:y=4:ch=h(1)
  83. 830 poke1584,13+mf*128:goto280
  84. 840 mf=1-mf:poke1584,13+mf*128:goto310
  85. 850 sys49158:printc$" options and colors [146]"
  86. 860 m$="background":t=0:mn=0:mx=15
  87. 870 gosub1110:ba=t
  88. 880 m$="border":t=11:gosub1110:pokeus+7,t
  89. 890 m$="puck color":t=14:gosub1110:pokeus+8,t
  90. 900 m$="bb color":t=15:gosub1110:pokeus+6,t*16+ba
  91. 910 m$="right gun color":t=1:gosub1110:pokeus+9,t*16+ba
  92. 920 m$="left gun color":t=1:gosub1110:pokeus+5,t*16+ba
  93. 930 m$="goals needed to win":t=7:mn=1:gosub1110:pokeus+2,t
  94. 940 print"how many seconds until destruct mode?"
  95. 950 m$="(-1 for no destruct)":t=60:mn=-1:mx=900:gosub1110
  96. 960 ift<0thenpokeus+3,255:goto980
  97. 970 se=t*60:t1=int(se/256):pokeus+3,t1:t2=256-se+t1*256:pokeus+4,t2
  98. 980 m$="friction: 1=on, 0=off":t=1:mn=0:mx=1:gosub1110:pokeus+10,t
  99. 990 print"choose 0 for shared bb's"
  100. 1000 m$="       1 for possessive":t=0:gosub1110:pokeus+12,t
  101. 1010 print"maximum number of bb's in play"
  102. 1020 m$="   ":t=100:mn=10:mx=250:gosub1110:pokeus-1,t+3
  103. 1030 m$="rapid fire delay":mn=1:mx=100:t=7:gosub1110:pokeus+11,t
  104. 1040 print:print"save new version to disk (y/n)?"
  105. 1050 geta$:ifa$="n"then1100
  106. 1060 ifa$<>"y"then1050
  107. 1070 fori=us+13to53248
  108. 1080 ifpeek(i)=255thensa=49152:ea=i+1:i=53248
  109. 1090 next:goto680
  110. 1100 gosub560:goto310
  111. 1110 printm$"   "t;
  112. 1120 fori=0tolen(str$(t))+1:printl$;:next:inputu
  113. 1130 ifu<mnoru>mxthenprintu$;:printm$"("mn"-"mx")   "t;:goto1120
  114. 1140 t=u:return
  115. 1150 sys49158:pokev+21,0:printc$tab(11)" command summary"
  116. 1160 print:print" the first five menu items change the"
  117. 1170 print" deflector type."
  118. 1180 print:print" the letter commands are:"
  119. 1190 print"  p - play with current settings"
  120. 1200 print"  s - save a screen to disk"
  121. 1210 print"  l - load a screen from disk"
  122. 1220 print"  c - clear screen of any barriers"
  123. 1230 print"  m - toggle symmetry mode"
  124. 1240 print"  o - choose options"
  125. 1250 print"  h - show help screen"
  126. 1260 print"  e - exit the program"
  127. 1270 print: print" commands can be invoked by pressing"
  128. 1280 print" that key, or by moving the cursor over"
  129. 1290 print" and pressing the fire button."
  130. 1300 print:print tab(8)" space bar to continue "
  131. 1310 geta$:ifa$<>" "then1310
  132. 1320 goto260
  133. 1330 poke53269,0:printchr$(147):end
  134. 1340 ifx=0thenf=0:goto340
  135. 1350 goto310
  136.